package com.anuo.app.modules.feed.dao;


import com.anuo.app.common.persistence.MyBatisDao;
import com.anuo.app.modules.feed.entity.*;
import com.anuo.app.modules.system.entity.Fileinfo;
import com.anuo.app.modules.user.entity.UserFilter;

import java.util.List;


@MyBatisDao
public interface FeedDao {
    void insertFeed(Feed feed);
    void insertFeedFileinfo(Fileinfo fileinfo);
    void deleteFeed(Feed feed);
    void deleteFeedFiles(Feed feed);

    void insertFeedTimeline(FeedTimeline feedTimeline);

    void insertFeedCommnet(FeedComment feedComment);
    void deleteFeedComment(FeedComment feedComment);

    /**
     * 增加一次对应动态的评论总数
     * @param feedComment
     */
    void addFeedCommentTotalOne(FeedComment feedComment);
    /**
     * 减少一次对应动态的评论总数
     * @param feedComment
     */
    void subFeedCommentTotalOne(FeedComment feedComment);

    void insertFeedCommentSupport(FeedCommentSupport feedCommentSupport);
    /**
     * 增加一次对应评论的点赞总数
     * @param feedCommentSupport
     */
    void addCommentSupportTotalOne(FeedCommentSupport feedCommentSupport);

    /**
     * 减少一次对应评论的点赞总数
     * @param feedCommentSupport
     */
    void subCommentSupportTotalOne(FeedCommentSupport feedCommentSupport);

    boolean isExistCommentSupport(FeedFilter feedFilter);

    void deleteFeedCommentSupport(FeedCommentSupport feedCommentSupport);

    boolean isExistFeedSupport(FeedFilter feedFilter);

    void insertFeedSupport(FeedSupport feedSupport);

    /**
     * 增加一次对应动态的点赞总数
     * @param feedSupport
     */
    void addFeedSupportTotalOne(FeedSupport feedSupport);

    /**
     * 减少一次对应动态的点赞总数
     * @param feedSupport
     */
    void subFeedSupportTotalOne(FeedSupport feedSupport);

    void deleteFeedSupport(FeedSupport feedSupport);

    List<Feed> getHotFeedList(FeedFilter feedFilter);
    int getHotFeedListCount(FeedFilter feedFilter);

    int getFeedCommentListCount(FeedFilter feedFilter);
    List<FeedComment> getFeedCommentList(FeedFilter feedFilter);

    int getHotFeedCommentListCount(FeedFilter feedFilter);
    List<FeedComment> getHotFeedCommentList(FeedFilter feedFilter);

    void insertFeedFollow(FeedFollow feedFollow);

    int getFollowedPersonFeedListCount(FeedFilter feedFilter);
    List<Feed> getFollowedPersonFeedList(FeedFilter feedFilter);

    boolean isFollowedThisPerson(FeedFilter feedFilter);

}